
//
//  LiveSingnalTableViewCell.m
//  LiveSoftware
//
//  Created by lanou3g on 15/7/15.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "LiveSingnalTableViewCell.h"

@implementation LiveSingnalTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        CGFloat gap = kScreenIp6(10);
        self.backgroundImageView = [[UIImageView alloc] initWithFrame:CGRectMake( 2 * gap, gap, kScreenWidth - 4 * gap, kScreenIp6(70))];
        self.backgroundImageView.image = [UIImage imageNamed:@"btn_bg_green_1"];
        [self addSubview:_backgroundImageView];
        
        self.liveImageView = [[UIImageView alloc] initWithFrame:CGRectMake( 2 * gap, gap, kScreenIp6(50), kScreenIp6(50))];
        self.liveImageView.image = [UIImage imageNamed:@"menu_live_green_2"];
//        self.liveImageView.backgroundColor = [UIColor redColor];
        [self.backgroundImageView addSubview:_liveImageView];
        
        CGFloat signalLabelX = CGRectGetMaxX(self.liveImageView.frame) + 3 * gap;
        CGFloat signalLabelW = self.backgroundImageView.frame.size.width - signalLabelX - gap;
        CGFloat signalLabelH = self.liveImageView.frame.size.height;
        self.signalLabel = [[UILabel alloc] initWithFrame:CGRectMake(signalLabelX, gap, signalLabelW, signalLabelH)];
        [self.backgroundImageView addSubview:_signalLabel];
        
        //线
//        CGFloat partHeight = _backgroundImageView.frame.size.height - kScreenIp6(1);
//        UIView *footLineView = [[UIView  alloc]initWithFrame:CGRectMake( 0, partHeight, kScreenWidth, 0.5)];
//        
//        footLineView.backgroundColor = [UIColor colorWithWhite:0.699 alpha:1.000];
//        // 设置 cell 点击没有变化
//        self.selectionStyle = UITableViewCellSelectionStyleNone;
//        
//        [self.backgroundImageView addSubview:footLineView];
//        
    }
    return self;
}

@end
